]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
altTab: Always include label in thumbnail
authorFlorian Müllner <fmuellner@gnome.org>
Mon, 12 Sep 2022 14:44:27 +0000 (16:44 +0200)
committerMarge Bot <marge-bot@gnome.org>
Tue, 18 Oct 2022 18:04:57 +0000 (18:04 +0000)
We currently special-case the no-window-title case when creating
items, but not when accessing labels later, for example during
allocation.

The easiest option it to create the label unconditionally, so do
that.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5851

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2483>

js/ui/altTab.js

index 95dc75f02ac98af4ace161490a6f889f2b49d75e..a3daebc20d276c83a02e1c3d114a5187e1824e75 100644 (file)
@@ -917,20 +917,16 @@ class ThumbnailSwitcher extends SwitcherPopup.SwitcherList {
             box.add_actor(bin);
             this._thumbnailBins.push(bin);
 
-            let title = windows[i].get_title();
-            if (title) {
-                let name = new St.Label({
-                    text: title,
-                    // St.Label doesn't support text-align
-                    x_align: Clutter.ActorAlign.CENTER,
-                });
-                this._labels.push(name);
-                box.add_actor(name);
+            const title = windows[i].get_title();
+            const name = new St.Label({
+                text: title,
+                // St.Label doesn't support text-align
+                x_align: Clutter.ActorAlign.CENTER,
+            });
+            this._labels.push(name);
+            box.add_actor(name);
 
-                this.addItem(box, name);
-            } else {
-                this.addItem(box, null);
-            }
+            this.addItem(box, name);
         }
 
         this.connect('destroy', this._onDestroy.bind(this));